package app.caihan.scframe.util

import app.caihan.scframe.BuildConfig
import app.caihan.scframe.constant.API_TAG
import app.caihan.scframe.constant.DEBUG_TAG
import com.blankj.utilcode.util.LogUtils

/**
 * log处理工具
 *
 * @author Seven-C
 * @date 2020/8/2
 */
object ScLog {

    private val isDeBug by lazy { BuildConfig.DEBUG }

    fun debugLog(vararg contents: Any) {
        log(DEBUG_TAG, *contents)
    }

    fun apiLog(vararg contents: Any) {
        log(API_TAG, *contents)
    }

    fun log(tag: String, vararg contents: Any) {
        if (isDeBug) {
            LogUtils.dTag(tag, *contents)
        }
    }


}